package com.inspire.tank;

import java.io.IOException;
import java.util.Properties;

/**
 * @author inspire
 * @description
 * @date 2022/6/5 13:12
 */
public class PropertyMgr {
    static Properties props=new Properties();

    static {
        try {
            props.load(PropertyMgr.class.getClassLoader().getResourceAsStream("config.config"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static Object get(String key){
        if(props == null){
            return null;
        }
        return props.get(key);
    }

    //test
    public static void main(String[] args) {
        System.out.println(PropertyMgr.get("initTankCount"));
    }
}
